const mongoose = require('mongoose')
const Schema = mongoose.Schema
const InterestSchemaConfig = {
  versionKey: false
}

const InterestSchema = new Schema({
  team: { type: Schema.Types.ObjectId, ref: 'Team' },
  name: String,
  attached: [{
    user: { type: Schema.Types.ObjectId, ref: 'User' },
    power: { type: Number, default: 0 }
  }]
}, InterestSchemaConfig)

exports = module.exports = InterestSchema
